﻿<%@ Page Language="C#" MasterPageFile="~/MainMaster.Master" AutoEventWireup="true" CodeBehind="OrglistProductSort.aspx.cs"
         Inherits="Mang24k99.Web.ProductQuote.OrglistProductSort" Title="首页排序" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 
    <script type="text/javascript">
        //只能输入数字
          function verify(obj)
          {
              if(!(obj.keyCode>=48 && obj.keyCode<=57) )
              {
                  obj.returnValue = false;
              } 
          }
    </script>
  <table border="0" cellpadding="0" cellspacing="0" width="100%" height="34px" align="center"
        background="../Images/bg1.jpg">
        <tr>
            <td>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
            <td>
                <a class="col" href="GoldBreed.aspx?procduct_type=<%=product_type %>">金品品种维护</a>
            </td>
            <td>
                <a class="col" href="OrglistProduct.aspx?procduct_type=<%=product_type %>">机构经营产品维护</a>
            </td>
            <td>
                <a class="col" href="OrglistProductQuote.aspx?procduct_type=<%=product_type %>">产品报价</a>
            </td>
            <td>
                <a id="sort" runat="server" class="col_on" href="OrglistProductSort.aspx?procduct_type=2">首页排序</a>
            </td>
        </tr>
    </table>

    <div>
    <table>
        <tr>
            <td class="tb_title1">请选择需要首页排序的报价产品：</td>
        </tr>
    </table>
         <table border="1" cellpadding="0" cellspacing="0" bordercolor="#BED6A6" style="border-collapse: collapse">
            <tr>
                <td class="tb_title1">
                    机构名称
                </td>
                <td class="tb_txt1">
                    <asp:DropDownList ID="ddlOrglist" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlOrglist_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="tb_title1">
                    金品大类
                </td>
                <td class="tb_txt1">
                    <asp:DropDownList ID="ddlGoldType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlGoldType_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
            </tr>
        </table>
    </div>
    <asp:Panel ID="Panel1" runat="server">
        <div>
            <asp:GridView ID="grdAdd" runat="server" Width="100%" 
                AutoGenerateColumns="False" onrowcommand="grdAdd_RowCommand" 
                EmptyDataText="数据为空！" >
                <HeaderStyle CssClass="tb_title2" />
                <RowStyle CssClass="tb_txt2" />
                <Columns>
                    <asp:TemplateField HeaderText="序号">
                        <ItemTemplate>
                            <%#Container.DataItemIndex+1%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="ProcductNO" HeaderText="主键"  
                         HeaderStyle-CssClass="hidden" ControlStyle-CssClass="hidden" 
                        ItemStyle-CssClass="hidden">
                        <ControlStyle CssClass="hidden" />
                        <HeaderStyle CssClass="hidden" />
                        <ItemStyle CssClass="hidden" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="金品名称">
                        <ItemTemplate>
                            <asp:Label ID="lbProductName" runat="server" Text='<%#Eval("MKtGoldGoldbreed.BreedName")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="MEASUREMENT" HeaderText="重量" />
                    <asp:TemplateField HeaderText="规格">
                        <ItemTemplate>
                            <asp:Label ID="lbProductUnit" runat="server" Text='<%#Eval("MKtCommCodelist.CODE_CNAME")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="添加到首页排序">
                        <ItemTemplate>
                            <asp:LinkButton ID="lkbtnAdd" runat="server" CommandName="add" 
                                    CommandArgument='<%# Eval("ProcductNO")%>'>添加</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </div>
    </asp:Panel>
    <table>
        <tr>
            <td class="tb_title1">首页排序</td>
        </tr>
    </table>
    <div>
        <asp:GridView ID="grdList" runat="server" Width="100%"  
            AutoGenerateColumns="False" onrowcommand="grdList_RowCommand" 
            EmptyDataText="数据为空！">
            <HeaderStyle CssClass="tb_title2" />
            <RowStyle CssClass="tb_txt2" />
            <Columns>
                <asp:TemplateField HeaderText="序号">
                    <ItemTemplate>
                        <%#Container.DataItemIndex+1%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="ProcductNO" HeaderText="主键"  
                       HeaderStyle-CssClass="hidden" ControlStyle-CssClass="hidden" 
                       ItemStyle-CssClass="hidden"/>
                 <asp:TemplateField HeaderText="机构名称">
                    <ItemTemplate>
                        <asp:Label ID="lbOrglistName" runat="server" Text='<%#Eval("MKtCommOrglist.OrgnizeName")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="金条名称">
                    <ItemTemplate>
                        <asp:Label ID="lbProductName" runat="server" Text='<%#Eval("MKtGoldGoldbreed.BreedName")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="重量">
                    <ItemTemplate>
                        <asp:Label ID="lbWeight" runat="server" Text='<%#Eval("MEASUREMENT")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="规格">
                    <ItemTemplate>
                        <asp:Label ID="lbUnit" runat="server" Text='<%#Eval("MKtCommCodelist.CODE_CNAME")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="首页排序">
                    <ItemTemplate>
                        <asp:TextBox ID="txtSort" runat="server" Text='<%#Eval("MpageOrder")%>' 
                                onkeypress="return verify(event)" MaxLength="3" Width="50px"></asp:TextBox>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="InputTime" HeaderText="创建日期" />
                <asp:TemplateField HeaderText="从首页排序移除">
                        <ItemTemplate>
                            <asp:LinkButton ID="lkbtnModi" runat="server" CommandName="move" 
                                    CommandArgument='<%# Eval("ProcductNO")%>'>移除</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    <asp:Panel ID="Panel2" runat="server">
        <table border="0" cellpadding="0" cellspacing="0" width="50%" align="center">
          <tr>
            <td align="center">
                <asp:Button ID="btnOK" CssClass="form_btn" runat="server" Text="确定" 
                    onclick="btnOK_Click"/></td>
            <td align="center">&nbsp;</td>
            <td align="center">
                <asp:Button ID="btnCancel"  CssClass="form_btn" runat="server" Text="取消" 
                    OnClientClick="return confirm('排序号修改未保存，确定取消吗？')" onclick="btnCancel_Click" /></td>
          </tr>
        </table> 
    </asp:Panel>
</asp:Content>
